package com.wn.class30.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * pay_order
 * @author 
 */
public class PayOrder implements Serializable {
    /**
     * 主键
     */
    private Integer pid;

    /**
     * 商户id
     */
    private Integer bussinessId;

    /**
     * 订单号
     */
    private String payOrderNumber;

    /**
     * 订单状态更改时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date payUpdateTime;

    /**
     * 订单状态 ,0.未支付 1以支付
     */
    private String payOrderState;

    /**
     * 支付额度
     */
    private Double payMoney;

    /**
     * 用户userid
     */
    private Integer userId;

    /**
     * 门店分润状态：0未分润，1已分润
     */
    private Integer payOrderSharestatus;

    /**
     * 商家名
     */
    private String businessName;

    /**
     * 门店消费分润时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date paySharetime;

    private static final long serialVersionUID = 1L;

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getBussinessId() {
        return bussinessId;
    }

    public void setBussinessId(Integer bussinessId) {
        this.bussinessId = bussinessId;
    }

    public String getPayOrderNumber() {
        return payOrderNumber;
    }

    public void setPayOrderNumber(String payOrderNumber) {
        this.payOrderNumber = payOrderNumber;
    }

    public Date getPayUpdateTime() {
        return payUpdateTime;
    }

    public void setPayUpdateTime(Date payUpdateTime) {
        this.payUpdateTime = payUpdateTime;
    }

    public String getPayOrderState() {
        return payOrderState;
    }

    public void setPayOrderState(String payOrderState) {
        this.payOrderState = payOrderState;
    }

    public Double getPayMoney() {
        return payMoney;
    }

    public void setPayMoney(Double payMoney) {
        this.payMoney = payMoney;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getPayOrderSharestatus() {
        return payOrderSharestatus;
    }

    public void setPayOrderSharestatus(Integer payOrderSharestatus) {
        this.payOrderSharestatus = payOrderSharestatus;
    }

    public String getBusinessName() {
        return businessName;
    }

    public void setBusinessName(String businessName) {
        this.businessName = businessName;
    }

    public Date getPaySharetime() {
        return paySharetime;
    }

    public void setPaySharetime(Date paySharetime) {
        this.paySharetime = paySharetime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PayOrder other = (PayOrder) that;
        return (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getBussinessId() == null ? other.getBussinessId() == null : this.getBussinessId().equals(other.getBussinessId()))
            && (this.getPayOrderNumber() == null ? other.getPayOrderNumber() == null : this.getPayOrderNumber().equals(other.getPayOrderNumber()))
            && (this.getPayUpdateTime() == null ? other.getPayUpdateTime() == null : this.getPayUpdateTime().equals(other.getPayUpdateTime()))
            && (this.getPayOrderState() == null ? other.getPayOrderState() == null : this.getPayOrderState().equals(other.getPayOrderState()))
            && (this.getPayMoney() == null ? other.getPayMoney() == null : this.getPayMoney().equals(other.getPayMoney()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getPayOrderSharestatus() == null ? other.getPayOrderSharestatus() == null : this.getPayOrderSharestatus().equals(other.getPayOrderSharestatus()))
            && (this.getBusinessName() == null ? other.getBusinessName() == null : this.getBusinessName().equals(other.getBusinessName()))
            && (this.getPaySharetime() == null ? other.getPaySharetime() == null : this.getPaySharetime().equals(other.getPaySharetime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getBussinessId() == null) ? 0 : getBussinessId().hashCode());
        result = prime * result + ((getPayOrderNumber() == null) ? 0 : getPayOrderNumber().hashCode());
        result = prime * result + ((getPayUpdateTime() == null) ? 0 : getPayUpdateTime().hashCode());
        result = prime * result + ((getPayOrderState() == null) ? 0 : getPayOrderState().hashCode());
        result = prime * result + ((getPayMoney() == null) ? 0 : getPayMoney().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getPayOrderSharestatus() == null) ? 0 : getPayOrderSharestatus().hashCode());
        result = prime * result + ((getBusinessName() == null) ? 0 : getBusinessName().hashCode());
        result = prime * result + ((getPaySharetime() == null) ? 0 : getPaySharetime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", pid=").append(pid);
        sb.append(", bussinessId=").append(bussinessId);
        sb.append(", payOrderNumber=").append(payOrderNumber);
        sb.append(", payUpdateTime=").append(payUpdateTime);
        sb.append(", payOrderState=").append(payOrderState);
        sb.append(", payMoney=").append(payMoney);
        sb.append(", userId=").append(userId);
        sb.append(", payOrderSharestatus=").append(payOrderSharestatus);
        sb.append(", businessName=").append(businessName);
        sb.append(", paySharetime=").append(paySharetime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}